#include"progress.h"

#define SIZE 101
#define TIME 100
#define TTYPE '#'
#define TSLEEP 2000*40
const char*str ="|/-\\";
void progress()
{

    char Bar[SIZE]={0};
    int rate=0;
    int num=strlen(str);
    while(rate<TIME)
    {
        Bar[rate++]=TTYPE;
        printf("[%-100s][%d%%][%c]\r",Bar,rate,str[rate%num]);
        usleep(TSLEEP);
        fflush(stdout);
    }
   printf("\n");
}
